/*
 * @Author: 王祥
 * @Date: 2021-11-18 10:42:23
 * @LastEditors: 李天
 * @LastEditTime: 2022-03-28 21:49:16
 * @Description: file content
 */
define(['text!' + ELMP.resource('components/flow-form-wapper/index.html', 'lib'), 'EventBus'], function (tmpl, EventBus) {
  return {
    name: 'FlowFormWapper',
    template: tmpl,
    props: {
      customNav: {
        type: Boolean,
        default: true
      }
    },
    data () {
      return {
        globFrom: false
      }
    },
    created () {
      this.globFrom = !!$.el.util.getHashParam('token')
      // this.globFrom = true
    },
    mounted () {
      if (this.globFrom) {
        EventBus.on('out:view:disabled', function (evt, $dom) {
          $('.el-dynamic-form-nav').css({ display: 'none' })
          $('input,select,textarea,radio', $dom).attr('disabled', 'disabled')
          $('button', $dom).css({ display: 'none' })

          $('.select-member-add', $dom).remove()
          $('.close', $dom).remove()
          window.CACHE_.OUTFROM = true
          console.log($dom, '初始化成功')
          setTimeout(() => {
            $('.el-button', $dom).css({ display: 'none' })
          }, 1000)
        })

        // console.log($dom, "初始化成功");
      }
      // if (!this.customNav) {
      //   console.log($('.el-dynamic-form-nav'), '11111111');
      //   $('.el-dynamic-form-nav').css({ margin: '0 -15px' })
      // }
    },
    methods: {
    }
  }
})
